﻿<%@ Page Title="" Language="C#" MasterPageFile="~/quickLMS.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:LoginView ID="loginview1" runat="server">
<AnonymousTemplate>

Welcome to the MIR Common Cartridge System.  
<br />
Please click Login to access the the system or Register to create a new user.<br><br>
<asp:Hyperlink runat="server" id="hlDownloads" Text="MIR Downloads & Demo Videos" NavigateUrl="~/Download/" />
</AnonymousTemplate>
<LoggedInTemplate>

<asp:UpdatePanel ID="update1" runat="server" UpdateMode="Conditional">
<ContentTemplate>

<div class="HeaderText" style="font-size: 20pt; text-decoration: underline;">
My Courses
</div>
<asp:GridView id="grdCourses" runat="server" AutoGenerateColumns="false" Width="100%" GridLines="None" Font-Names="georgia" AllowPaging="true" PageSize="3" OnPageIndexChanging="ChangePage">
<Columns>
    <asp:TemplateField>
        <ItemTemplate>
            <table style="font-size: 10pt;">
                <tr>
                    <td>
                        <asp:Label ID="lblCourseName" runat="server" Text='<%# Eval("CourseName") %>' Font-Size="20pt"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 50px;">
                        Description: <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 50px;">
                        Date Created: <asp:Label ID="lblCreated" runat="server" Text='<%# Eval("CreatedOn") %>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 50px;">
                        <asp:LinkButton ID="lnkLaunch" runat="server" Text="Launch Course" CommandArgument='<%# Eval("CourseID") %>' OnCommand="LaunchCourse"></asp:LinkButton>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:TemplateField>
</Columns>
<EmptyDataTemplate>
You dont have access to any courses at this time
</EmptyDataTemplate>
</asp:GridView>

</ContentTemplate>
</asp:UpdatePanel>

<script type="text/javascript">
    //window.scrollTo(0, 100);
function showHide(id) 
{
    var element;
    element = document.getElementById('description' + String(id));
    
    
    if (element.style.display == "block")
    element.style.display = "none";    
    else
        element.style.display = "block";
}
</script>

</LoggedInTemplate>

</asp:LoginView>

<br /><br />
<asp:Label ID="lblStatus" runat="server" ForeColor="DarkRed" Font-Size="14pt"></asp:Label>
</asp:Content>

